def RaiseKernelPanic(reason):
    import micropython, time, machine

    micropython.mem_info()
    micropython.qstr_info()

    print(f"\n\nSystem halted, called emergency stop: {reason}")
    time.sleep(20)
    machine.reset()